Release Notes for dsPIC(R) Language Tools, v1.33.01
26 August 2005

C O N T E N T S

1. Overview
2. GNU General Public License
3. Devices Supported
4. Installation
5. Migrating to Version 1.3x
6. What's New in this Release
7. Documentation Updates
8. Fixed Issues
9. Limitations
10. Environment Variables Modified
11. Customer Support

-------------------------


1. Overview

   The dsPIC language tools consist of a compiler (pic30-gcc.exe), an
   assembler (pic30-as.exe), a linker (pic30-ld.exe), and an archiver/
   librarian (pic30-ar.exe). Additional tools distributed with this
   release include a binary to Intel Hex converter (pic30-bin2hex.exe)
   and a command-line simulator (sim30.exe).

   The command-line simulator (sim30.exe) included with the tools
   may be used to test and debug C or assembly-language programs.
   The simulator supports the complete dsPIC30 instruction set, and a
   restricted set of peripherals (two UARTS, five General Purpose
   Timers, 10-bit A/D converter, 12-bit A/D converter, PWM, Input
   Capture, Input Change Notification, I/O ports, Data RAM, Program
   Flash, Data EEPROM, and an Interrupt Controller).

   As described in the User's Guides, all of the language tools are
   sensitive to case on the command-line, including the case of file
   names. In particular, the C compiler shell (pic30-gcc) requires
   that C source files be named on the command-line with a lower-case
   .c extension. If an upper-case .C filename extension is used,
   the compiler assumes that the file is a C++ file, which is not
   supported.
 
   Section 7 of this README contains documentation updates that have 
   not yet made it to the online or printed manuals.

2. GNU General Public License

   With the exceptions noted below, the dsPIC tools are written and
   distributed under the GNU General Public License (GPL) which means
   that its source code is freely distributed and available to the
   public.

   The source for the tools under the GNU GPL may be downloaded
   separately from the Microchip WWW web page. You may read the
   GNU GPL in the file named COPYING located the top level of your
   install directory. A general discussion of principles underlying
   the GPL may be found at www.gnu.org/copyleft.

   Exceptions to the GNU GPL:

   pic30-lm
   pic30-pa
   sim30

   Support code provided for the header files, linker scripts, and
   runtime libraries are also exceptions to, and therefore not
   covered under, the GPL.


3. Devices Supported

   The following dsPIC devices are supported:

     30F2010      30F3010      30F4011      30F5011      30F6010
     30F2011      30F3011      30F4012      30F5013      30F6010A
     30F2012      30F3012      30F4013      30F5015      30F6011
     30F2020*     30F3013                   30F5016      30F6011A
     30F2021*     30F3014                                30F6012
     30F2022*                                            30F6012A
     30F2023*                                            30F6013
                                                         30F6013A
                                                         30F6014
                                                         30F6014A
                                                         30F6015

     (*) These devices do not yet have Peripheral Library support.

4. Installation

   If using MPLAB IDE, be sure to install MPLAB IDE v7.01 or later
   before installing these tools.

   To install the MPLAB C30 tools, perform the following steps:
   - Locate the setup program on the Language Tools CD ROM.
   - Run the setup program.
   - Follow the directions on the screen.
   - If the installation program indicates that it is necessary,
     reboot your computer to complete the installation.
   - When the installation is complete, verify that the executable
     directory has been correctly added to your PATH (i.e., if you
     chose to install the tools in the default directory,
     c:\Program Files\Microchip\MPLAB C30, then ensure that
     c:\Program Files\Microchip\MPLAB C30\bin has been added to your
     PATH).
     From a DOS prompt, type:

       c:\>PATH

   To verify installation, perform the following steps:
   - At a DOS prompt, go to the examples directory (by default, it is
     c:\Program Files\Microchip\MPLAB C30\examples)
   - Type:

       run_hello.bat

   - If the tools are installed correctly, the output should show the
     various steps in the compilation and execution process ending
     with the text:

       Hello, world!

5. Migrating to Version 1.3x

   Users of previous versions of MPLAB C30 (version 1.20.xx and
   earlier) may wish to read the migration document provided with
   this release.  This may be found on the installation CD or in
   the MPLAB C30 download area of the Microchip web site.

6. What's New in this Release.

   a.  v1.33

     * This release contains support for four new devices:  30F2020,
       30F2021, 30F2022, and 30F2023.  Peripheral library support is
       not yet included; it is anticipated that support will be
       provided with the next major update.
       
     * The installer now supports an option to install MPLAB C30
       for all users on a machine.
       
     * This release contains a number of support fixes.  Please see
       section 8 for complete details.

     * The instruction scheduler has been disabled.

   b.  v1.32

     * This release contains support for four new devices:  30F5015,
       30F5016, 30F6010A, and 30F6015.

     * This release contains complete MPLAB IDE projects as examples
       for performing common dsPIC specific tasks.  These examples are
       located within folders under the examples folder.  The examples

       include:

       * Locating a variable at a specific address
       * Locating a function at a specific address
       * Saving and restoring the PSVPAG register
       * Locating a constant at a specific address in program memory
       * Locating and accessing data in EEPROM memory
       * Creating and incrementing a modulo buffer in X memory

     * This release contains a new builtin function to allow users to
       generate the bit toggle instructions under conditions where the
       compiler would not normally generate one.  The prototype for
       the new builtin is:

         void __builtin_btg(unsigned int *, unsigned int);

       The first parameter should be a pointer to the data item for
       which a bit should be toggled.  The second parameter should be
       a literal value in the range of 0 to 15.  As a convenience, it
       is possible to pass a bit-field name as this argument.  The
       builtin will substitute the bit position of the identified
       field for the argument and toggle the appropriate bit.  Some
       examples include:

       int i;                                   /* near by default */
       int l __attribute__((far));

       struct foo {
         int bit1:1;
       } barbits;

       int bar;

       void some_bittoggles() {
         register int j asm("w9");
         int k;

         k = i;

         __builtin_btg(&bar,barbits.bit1);
         __builtin_btg(&i,1);
         __builtin_btg(&j,3);
         __builtin_btg(&k,4);
         __builtin_btg(&l,11);

         return j+k;
       }

       Note that taking the address of a variable in a register will
       produce warning by the compiler and cause the register to be
       saved onto the stack (so that its address may be taken); this
       form is not recommended. This caution only applies to variables

       explicitly placed in registers by the programmer.

     * Three new helper macros have been added to the processor
       specific header files to aid the programmer in safely adjusting
       the CPU's interrupt priority level.  These macros are:

       SET_CPU_IPL(ipl)
       SET_AND_SAVE_CPU_IPL(save_to, ipl)
       RESTORE_CPU_IPL(saved_to)

       For example, one may wish to protect a section of code from
       interrupt.

       void foo(void) {
         int current_cpu_ipl;

         SET_AND_SAVE_CPU_IPL(current_cpu_ipl, 7);  /* disable
                                                       interrupts */
         /* protected code here */
         RESTORE_CPU_IPL(current_cpu_ipl);
       }

     * This release contains a number of support fixes.  Please see
       section 7 for complete details.

   c.  v1.31

       This release contains a number of support fixes.  Please see
       section 7 for complete details.

   d.  v1.30

       This release provides a number of enhancements to make
       accessing the unique features of the dsPIC easier. These are
       summarized below, with more information available in the
       accompanying documentation.

       This release also provides support for ELF object files and the
       DWARF debugging format, which is compatible with MPLAB 7.0 and
       greater.  ELF/ DWARF support is selected via the command-line
       option -omf=elf or through the environment variable
       PIC30_OMF=elf or through an IDE check box.

       Compiler
       --------

       * A new instruction scheduling phase has been implemented. This
         phase attempts to reduce stalls caused by data flow
         dependencies.  This is enabled at higher levels of
         optimization and can be manually controlled via the
         -fschedule-insns and -fno-schedule-insns options.

       * A number of new builtin functions are provided to enable
         users to make use of non-standard mixed mode mathematical
         operations.  These functions are detailed in Section 5.2 of
         the dsPIC Language Tools Libraries guide.

       * The attribute syntax has been enhanced to allow finer control
         over placement of functions and data within the various dsPIC

         memories.  For more information, please see sections 2.3.1
         and 2.3.2 of the MPLAB C30 C Compiler User's Guide.

       * The compiler supports a binary radix for literals. A binary
         number may be specified by prefixing the literal with '0b'.

       * ELF and DWARF are supported.

       Assembler
       ---------

       * A new syntax for the .section directive is supported, to
         accommodate new section attributes such as xmemory, ymemory,
         and eedata.  The previous syntax is also supported, with the
         exception of numbered subsections. See section 6.3 of the
         MPLAB ASM30, MPLAB LINK30 , and Utilities User's Guide for a
         complete list of new section attributes and related
         information.

       * Two new directives have been added to support binary include
         files: .incbin and .pincbin. See section 6.12 of the MPLAB
         ASM30, MPLAB LINK30, and Utilities User's Guide for more
         information.

       * The -ai listing option now tabulates gaps between variables
         that have been inserted to satisfy alignment requirements.
         Such gaps may be reduced or eliminated by re-ordering
         variable definitions or placing variables with different
         alignment requirements in separate sections.

       * The User's Guide has been extensively updated.

       * The ELF object file format is supported.

       Linker
       ------

       * The memory allocation strategy has been improved to reduce
         memory gaps due to section alignment requirements. First a
         sequential allocation pass is performed, which is fully
         compatible with existing linker scripts. Next a best-fit
         allocator is invoked, to locate any sections which are not
         explicitly mapped in the linker script. Unmapped sections
         are located according to their attributes, such as xmemory,
         ymemory, etc. Reverse-aligned sections are also supported.
         See section 10.5 of the MPLAB ASM30, MPLAB LINK30, and
         Utilities User's Guide for more information.

       * The standard linker scripts have been revised to benefit from
         the new memory allocation strategy. All of the standard data
         memory sections have been removed, so they become unmapped
         and therefore eligible for best-fit allocation. To support
         this approach, the standard section names now have implied
         attributes. See section 6.3 of the MPLAB ASM30, MPLAB LINK30,

         and Utilities User's Guide for a list of reserved section
         names with implied attributes.

         Projects which include a custom linker script should build
         correctly with v1.30. To take advantage of improvements to
         the memory allocation strategy, comment out or remove
         statements in the custom linker script which define the
         following sections: .xbss, .xdata, .pbss, .nbss, .ndata,
         .bss, .data, .ybss, .ydata. Also remove the statement s which

         calculate __X_OVERFLOW and __NEAR_OVERFLOW. As noted above,
         sections which do not appear in the linker script are
         eligible for best-fit memory allocation. To verify the effect

         of these changes, compare the memory usage report before and
         after editing the linker script.

       * The memory usage report in the map file has been improved,
         and a sorted list of external symbols has been added.

       * The linker supports ELF object files. Executables from mixed
         format object files are not supported.

       * Several 'e' variant linker scripts have been added to the
         support/gld directory. These linker scripts are intended to
         be used when linking for the ICE4000 emulator. Only devices
         with less than 8K of data memory require 'e' variant linker
         scripts.

       * The following new command line options have been added:
         --fill-upper VALUE  Set fill value for upper byte of data
                             (default = 0)
         --isr               Create interrupt function for unused
                             vectors (default)
         --no-isr            Don't create interrupt function for
                             unused vectors
         --report-mem        Report memory usage to console

       Libraries
       ---------

       * ELF format pre-built libraries are provided.

       * Peripheral library build batch file can now be directed to
         target a particular dsPIC variant.

       Utilities
       ---------

       * pic30-bin2hex no longer writes a memory usage report to the
         console by default. To enable the report, the -v option must
         be specified.  The new linker option --report-mem is intended

         to replace this functionality.

       * ELF format object files are supported with the utilities.

       Simulator
       ---------

       * ELF format executables may be simulated.


7. Manual Updates

   This section contains clarifications or other additional
   information that has not yet made into the online or printed 
   manuals.

   DS41284 - MPLAB C30 User's Guide
   -------

     Section 8.4: Using Inline Assembly Language

     There are special precautions that must be taken when making
     control flow changes within inline assembly statements.  

     There is no way, for example to tell the compiler that an 
     inline asm statement may result in a change of control flow.
     The control should enter the asm statement and always proceed
     to the next statement.  See the following examples:

     * asm("call _foo" : /* outputs */ 
                       : /* inputs */ 
                       : "w0", "w1", "w2", "w3", "w4", "w5", 
                         "w6", "w7");
       /* next statement */

       This is acceptable because after calling foo, the next
       statment will be executed.  Note that we tell the compiler
       that some registers do not survive this statement, these
       represent the registers that will not be preserved by foo.

     * asm("bra OV, error");
       /* next statement */
       return 0;

       asm("error: ");
       return 1;

       This is un-acceptable, the compiler will assume that the
       next statment, return 0, is executed when it may not be.  In
       this case, the asm("error: ") and following statments will be
       deleted because they are unreachable.  See further text
       regarding labels in asm statements.

     * asm("cp0 _foo\n"
           "bra nz, eek\n"
           "; some assembly\n"
           "bra eek_end\n"
           "eek:\n"
           "; more assembly\n"
           "eek_end:");
       /* next statement */

       This is acceptable (but not very pleasant) because the next
       statement is always executed, regardless of any branch inside
       the asm statment.  See further text regarding labels in asm 
       statements.

     Additonally, labels inside assembly statements can behave badly
     with certain optimization options.  The inliner may cause 
     labels within asm statements to be defined multiple times.  
     Also the procedural aggragator tool (-mpa) does not accept the 
     local label syntax.  See the following examples:

     * inline void foo() {
         asm("do #6, loopend");
         /* some C code */
         asm("loopend: ");
         return;
       }

       This is bad for a number of reasons.  First, the asm 
       statments introduce an implied control flow that the compiler
       does not know about.  Second, if foo is inlined the label
       loopend will be defined many times.

     * inline void foo() {
         asm("do #6, 0f");
         /* some C code */
         asm("0: ");
         return;
       }

       The above form is slightly better; it at least will fix the
       multiply defined label issue.  However the procedural
       aggregator tool (-mpa) does not accept the "0:" form of the
       label.
       

8. Fixed Issues

   a.  v1.33

       Assembler
       ---------

       25958 - .align in absolute section is broken
       
               The alignment requested by the .align, .palign
               directives can not exceed the natural alignment
               of an absolute section
       
       26951 - DISI instruction is allowed to be last instruction
               in DO loop
       
       26952 - MOV.D instruction is allowed to be used as repeat
               instruction
       
       27060 - [30F4011/4012] INC files missing FRC_PLL definitions
       
       27154 - unlinked absolute PSV sections show incorrect VMA

       27292 - No error for restricted instr immediately following
               REPEAT Wn
       
       27304 - Two errors for .equiv redefining executable symbol
       
       
       Compiler
       --------

       22851 - Assign 255 to a near address without using a register

       22853 - The compiler can be better at using the legacy memory
               operations

       22856 - Compiler misses some literal optimizaton

       24209 - Improve code generated for >>16 and <<16.

       25202 - Improve code generated for cast/multiply/shift
               operation

       26756 - With large data model, data marked as near not given
               the near treatment

       26760 - Provide some user documentation regarding atomic
               operations and ISR interaction in USER Guide

       26901 - No code generated for __builtin_btg (ptr+const,const)

       26902 - Internal error for __builtin_btg (ptrU8, const)

       26945 - pic30-lm fails when used on a system with an invalid
               date

       27110 - Code causes "fixup_reorder_chain" error when compiled
               with -O2 or -O3

       27147 - Compiler uses frame-pointer AND w14 as a regiser
               variable
               
       27322 - __builtin_btg (ptrU16,const) toggles pointer rather
               than the int
       
       27428 - When setting code protection bits for dsPIC30F3010
               (and others) in C30 not all of the needed bits are
               configured

       Linker
       ------
       
       27437 - [30F4013] GLD file does not define CNEN2 or CNPU2
       
       Libraries
       ---------
       
       27024 - Comparison of unsigend int to plain int in getsUARTx.c
       
               The library function getsUARTx() would not behave
               properly if parameter uart_data_wait was greater
               than 0x7FFF.

   b.  v1.32

       Assembler
       ---------

       26267 - Provide default include path for assembler

               The assembler will now include the support/inc
               directory automatically so that no include path needs
               to be specified for installations that conform to the
               standard structure.

       26300 - Examples in device include files show incorrect symbols
               for FOSC

       26523 - Bad error message for "btss.b w3,#0"

       26616 - Assembler merges changed section attributes, creating
               potential conflicts

       26725 - .align 4 fails on even address boundary in program
               memory

       Compiler
       --------

       25946 - Emit error diagnostic for odd address attribute values

               The linker does not support placing sections at odd
               num bered addresses, they must be at least an multiple
               of 2.

       25950 - Add warning for conflict between near attribute and
               address attribute which specifies a far address

               If a variable is given a far address via the far
               attribute, this will take precedence over the
               variable's nearness.  If near was explicitly requested
               via an attribute, a warning message will be generated.

       25959 - Warn user that attributes combined with space(auto_psv)
               affect all const-in-code variables

               Certain attributes placed with an auto_psv psv will be
               converted to space(psv) and some will be ignored.  In
               all cases a warning will be generated.

       26066 - Warn user for initialization of noload or persistent
               variable

       26100 - 30F2010 support files define low-voltage detect bits
               but the device does not support the feature

       26118 - Change makeplib.bat to use "goto end" instead of "exit"

               This change will prevent DOS from destroying the window
               when the batch file terminates abnormally.

       26423 - Warn if the users accesses WREG0 to WREG15 in their
               application

               It is not advisable to access the memory mapped
               versions of the working registers as these are a
               compiler managed resource.

       26484 - -merrata=retfie_disi is broken

       26488 - Unnecessary callee save/restore of W0

       26518 - Segmentation fault when using named PSV sections

       26604 - 30F4013 PORTAbits.RA11, and other bits, not defined in
               support files

       26686 - Optimization failure at -Os

               The following coding style may have produced invalid
               code at some optimization levels:

               int foo;

               int test_and_set_foo();     /* this function may
                                              modify foo */

               ...

                  if (test_and_set_foo()) {
                    // use foo
                    if (foo) { }
                  } else if (foo == 0) {
                  }

               the access of foo may have been generated before the
               function call of test_and_set_foo().

       26749 - [illegal] Internal error accessing space(prog) variable
               as space(data)

       26759 - Add builtin to allow the programmer access to the btg
               instruction

               See section 6 for information about this new builtin.

       26826 - Reload error at -O1 (byte comparisons)

       Installer
       ---------

       26004 - Upgrade patch does not remove obsolete files

       Linker
       ------

       25983 - Data memory is missing 6 bytes

       26155 - Confusing list of zero length section appears in map
               file

       26307 - Initialization data entry created for initialized
               noload data variable

               noload sections should not be initialized, the compiler
               will now ensure that this does not happen.  The linker
               will ignore these sections when generating
               initialization templates.

       26329 - [ELF] Single initialized data section fails

       26349 - Linker silently ignores address attribute for .const
               section

               The compiler does not allow an address to be assigned
               to a .const section.  The assembler will now display an

               error too.

       26350 - Input sections with conflicting attributes can cause
               problems if merged in linker script

       26351 - Error message uses old style quoted section flags

       26412 - Functions with the noload attribute get put into the
               .text segment in a COFF file

               noload functions will now be placed into their own
               sections.

       26617 - Conflicting section attributes can cause a segmentation
               fault

       26626 - Comments in emulator-specific linker scripts should
               indicate that the scripts are for emulation only

       26628 - Section name "eedata" in linker scripts does not match
               compiler

               The "eedata" output section has no bearing with the
               name of the input section created by the compiler or
               other tool.  The example in the linker scripts have
               been clarified by renaming the output section to
               "user_eedata" to match the form used by other examples.

       26741 - Linker warning for uninitialized noload variable

       Utilities
       ---------

   c.  v1.31

       Assembler
       ---------

       26292 - Assembler does not support new 'A' devices.

               The command line option --proc= did not accept 30F6011A
               to 30F6014A.

       25961 - Compiler uses .long for unsigned 32-bit init value
               causing extraneous assembler warning for values where
               the MSb is set

       Compiler
       --------

       25938 - '-merrata=list,psv' does not enable psv errata
               work-around

       26120 - -merrata=retfie is broken

               The compiler generated a reference to an incorrect
               symbol.  In v1.30 an  amendment to the .gld files was
               made to work-around the problem.

       26282 - Comparison of byte sized data using base+offset
               address ing mode broken

       26287 - [ELF] Address Attribute on function causes assembly
               error when compiled with -g (DWARF debugging info)

       26293 - Compiler does not support new A devices

               The command line option -mcpu= did not accept 30F6011A
               to 30F6014A.

       26302 - Address attribute causes incorrect comparison in u16
               equality expression in 'if' statement

       26312 - Invalid branch generated at -O1 but not at any other
               level

       26328 - Constant string in PSV section initialized poorly

               char *foo __attribute__((space(psv),section("bar"))) =
                    "eek";

               foo is correctly placed into a PSV section named bar,
               but the initializer "eek" was incorrectly placed into
               the default .const section, making the initialization
               invalid with multiple PSV sections.

       Installer
       ---------

       26172 - Upgrade patch/demo does not remove old library files

       Utilities
       ---------

       26294 - Peripheral libraries, p30fxxxx.h generic header file,
               and p30fxxxx.inc generic include file do not suppport
               new 'A' devices.

   d.  v1.30

       Compiler
       --------

       16326 - Binary prefix for numeric constants.

               This is an extension to the C language. A binary
               constant may be written by prefixing the binary number
               with 0b.

       16381 - Avoid instruction stalls when possible.

       22270 - Extraneous internal error for incomplete #pragma with
               -Wall option.

       22854 - The compiler mises some opportunities for converting a
               call or rcall followed by a return into a branch or
               goto instruction.

       22855 - -mpa can cause less efficient code to be generated for
               return statements where a literal value is returned.

       23084 - Optionally allow signed/unsigned multiplication based
               upon command line option.

               The compiler provides two new functions to explicitly
               use a mixed sign multiplication. See the latest MPLAB
               C30 Library Guide for more information. The functions
               are:

               signed long __builtin_mulsu(const signed int a,
                                           const unsigned int b);
               signed long __builtin_mulus(const unsigned int a,
                                           const signed int b);

       23317 - Interrupt vector name should not be validated when
               using the irq or altirq parameter to the interrupt
               attribute.

       23321 - No warning for macro re-definition with mismatched
               token count.

       23347 - PA assembler doesn't accept extend PUSH and POP
               mnemonics.

       23366 - Provide a built-in function for 32/16 integer divide.

               The compiler provides two new functions to explicitly
               use a mixed size division. See the latest MPLAB C30
               Library Guide for more information. The functions are:

               unsigned int __builtin_divud(unsigned long num,
                                            unsigned int den);
               signed int __builtin_divsd(signed long num,
                                          signed int den);

       23362 - Fatal error from pic30-pa for ineligible instructions
               following a 'skip'-style or REPEAT instruction.

               These instruction combinations may still be illegal,
               but will be reported by the assembler instead of the
               PA tool.

       23375 - Allow makeplib.bat to produce only one Peripheral
               Library.

               The batch file now will takes an optional parameter
               specifying a target variant. For example, makeplib.bat
               30F2010 will produce a new Peripheral Library
               specifically for the 30F2010 variants.

       23528 - Improve usability of the __builtin_psv*() and
               __builtin_tbl*() functions.

               The new space() attributes should improve this
               functionality.

       23535 - Improve code generated for (32 * 32) >> 16.

       23635 - Internal compiler error when attempting to take the
               address of a file scope register variable with user
               assigned register.

       23681 - Internal compiler error when marking an un-named type
               as deprecated and subsequently making use of the type.

       23689 - Treat objects that are placed in an "r" type section as
               being located in a user managed PSV space. Such objects

               may be accessed using the __builtin_tblpage() family of

               functions.

       23938 - Anonymous structures in unions are not represented in
               the COFF file with -g.

               The compiler will generate a false tag name for the
               IDE to display.

       24086 - "Calling non-function symbol" error message not always
               emitted.

       24358 - The -save-temps option combined with -o causes a C file
               to be passed to the linker.

               The -save-temps option will no longer attempt to name
               the temporary files based upon the value of the -o
               option.

       24391 - space(prog) attribute does not work as described.

               The space() attribute may now be used to direct
               placement in a more specific way. See the latest MPLAB
               C30 Users Guide for more information.

       24800 - Using named sections in C can cause assembly errors.

       25087 - The technical support URL which is displayed in the
               unfortunate event of an internal compiler error is
               incorrect.

       25145 - The pic30-pa tool will not execute if installed into a
               directory containing a space.

       25297 - The option -merrata=all may cause conflicting errata
               solutions to be implemented.

               When a conflict would occur, the compiler will choose
               to enable the first errata workaround it encounters.
               See -merrata=list to determine the order of selection.

       25938 - The option combination "-merrata=list,psv" does not
               invoke the psv errata workaround.

       25940 - Incorrect branch generated for second instance of <=
               comparison.

               Comparisons with data located in near memory may have
               been affected.

       26017 - _U1RXIE incorrectly defined in .h device-support files.

       Assembler
       ---------

       16051 - The .bf/ .ef debug symbols are always generated in the
               .text section instead of the last code section.

       18105 - The command line option --statistics causes a page
               fault under Windows 98.

       22027 - The assembler should issue a warning when a .long
               parameter is out of range.

       22090 - The .equ directive may re-define a label and give
               unexpected results.

       23342 - The .pword directive may mis-evaluate expressions.

       23694 - Register W14 should not be accepted as a destination
               for MUL instructions.

       23359 - Provide a second mnemonic for the BRA Z and BRA NZ
               instructions.

               The assembler now additionally accepts BRA EQ for BRA Z
               and BRA NEQ for BRA NZ.

       23761 - Warn if assembler macros are re-defined.

       24791 - Bad code generated for goto $-2.

               The target of a goto statement cannot be a PC relative
               (referencing the $ or . symbols) expression.

       Linker
       ------

       16297 - Add reverse alignment capability.

               MPLAB ASM30 supports the reverse() attribute to the
               section directive. MPLAB C30 supports the reverse()
               attribute on variable declarations. See the respective
               manuals for more information.

       16298 - Improve the linker allocation algorithm.

       17554 - Add a sorted symbol table to the map file.

       19223 - Improve heap and stack allocation.

       20972 - Labels in the main body of the link map should be
               sorted.

       21590 - Some linker error messages appear twice.

       21674 - Some default COFF file header flags are not relevant to
               dsPIC.

       21678 - The command line options -s and --retain-symbols-file
               interact badly.

       22024 - The command line option --sort-common may not sort
               symbols by size.

               This option is no longer supported as it does not
               pertain to the dsPIC.

       22199 - Internal error when linking a noload, executable
               section in more than one object module.

       23293 - Users unable to specify fill byte with
               constants-in-code memory model.

               Added the --fill-upper option to pic30-ld.

       23522 - Link map is incorrect for user defined stack.

       23763 - Add a --report-mem option.

       23764 - Improve memory usage report by indicating the amount of
               free memory available.

       24975 - Aligned and initialized arrays may not be correctly
               initialized at start-up.

       25342 - Add --no-isr option.


9. Limitations

   The current limitations are as follows.

   Assembler
   ---------

   * Arguments to the address() section attribute must be even.

   * The default section alignment is 2**1. Therefore the minimum
     section length is 2 bytes in data memory, and 2 PC units
     (3 bytes) in program memory.

   * 15741 - The .lcomm directive causes incorrect source line numbers
             in the assembler listing file.

   * 20016 - Special operators should not accept odd offsets in
             program memory.

   * 21797 - The .align directive changes section alignment regardless
             of max-skip.

   * 23306 - The option -g does not work with any section other than
             .text.

   * 23406 - The .fixed directive introduces quantization error.

             The assembler will round toward zero, not to nearest.

   * 25555 - Cannot generate code for goto $-2.

   * 26070 - The .pushsection, .popsection directives are not
             implemented.

   * 26164 - The instruction scheduler can cause code to be re-ordered
             badly.

   * 27344 - .fillupper and .fillvalue directives are incorrectly
             described (in the User's Guide)

             The documentation states "the value is persistent
             throughout all code sections." In fact, these
             values are saved and restored so that each code
             section retains a unique fill value.

   * 27427 - Bits INT1EP and INT2EP of INT2CON register for
             30F2011 and 30F3012 devices are not defined in
             the corresponding .inc files.
   Compiler
   --------

   * Structures must be less than 4096 words in size.

   * Blocks of code (such as a conditional statement or loop) may
     not exceed 32K program words.

   * When the procedural abstraction optimization is enabled (using
     the -mpa command-line option) inline assembly code must be
     limited to valid machine instructions. Invalid machine
     instructions or instruction sequences, or assembler directives
     (sectioning directives, macros, include files, etc.) must not be
     used, or the procedural abstraction compilation stage will fail,
     inhibiting the creation of an output file.

   * Data placed in space(ymemory) with the new section directives or
     through legacy section(".ybss") or section(".ydata") attributes
     may cause a link error. Releases prior to v1.30 did not support
     the notion of near Y-memory. The compiler's default data memory
     model is -msmall-data / -msmall-scalar, which places variables
     into near memory. Since not all dsPIC30F variants have their
     entire Y memory in near data space, users may now need to define
     Y memory variables with the "far" attribute or compile with the
     -mlarge-data / -mlarge-scalar switch.

   * 20219 - Watch displays as a struct for (unsigned long long)
             64-bit integer under some conditions.

   * 26756 - With large data model, -mlarge-data, data marked with the
             near attribute will not be accessed with optimal
             instruction sequences.

   * 26772 - The -g option will cause invalid assembly generation for
             functions which have the noload attribute.

   * 26819 - Procedural abstraction does not accept all forms of the
             mpy or mac instructions which be significant to users
             that define such instructions within inline assembly
             sequences.

   Linker
   ------

   * 25966 - Functions with the address attribute may cause a link
             error Some addresses will be invalid for the address
             attribute, notably those that are used for the .handle,
             .libc, .libm, .libdsp and other .lib sections.

             Addresses that conflict the .text section can be
             accommodated by modifying the linker script.  To modify
             the linker script, simply remove the .text section from
             the list of input sections for the output section named
             .text.  For example, it may be modified to read:

             /*
             ** User Code and Library Code
             */
             .text __CODE_BASE :
             {
                *(.handle);
                *(.libc) *(.libm) *(.libdsp);  /* keep together in
                                                  this order */
                *(.lib*);
                                               /* *(.text); */
             } >program

             This will cause the linker to place the .text input
             sections after satisfying all of the absolute section
             requirements.


10. Environment Variables Modified

   The previous installation of MPLAB C30 may have created the
   following environment variables:

        PIC30_C_INCLUDE_PATH
        PIC30_LIBRARY_PATH

   If these variables are set, they may reference libraries and
   include files from a previous installation that are not compatible
   with the current installation.

   If the variables do not reference user paths, we recommend that you
   delete them. The compiler is capable of locating its own include
   files and libraries without these environment variables set.

   If these have been amended, then you may either modify the values
   to reference the new install directory, or, delete the environment
   variables and add the relative paths to the compilation command
   lines.


11. Customer Support

The Microchip Web Site
----------------------

Microchip provides online support via our web site at
www.microchip.com.  This web site is used as a means to make files and

information easily available to customers. Accessible by using your
favorite Internet browser, the web site contains the following
information:

* Product Support - Data sheets and errata, application notes and
  sample programs, design resources, user's guides and hardware
  support documents, latest software releases and archived software

* General Technical Support - Frequently Asked Questions (FAQs),
  technical support requests, online discussion groups, Microchip
  consultant program member listing

* Business of Microchip - Product selector and ordering guides, latest
  Microchip press releases, listing of seminars and events, listings
  of Microchip sales offices, distributors and factory representatives

Development Systems Customer Change Notification Service
--------------------------------------------------------

Microchip's customer notification service helps keep customers current
on Microchip products. Subscribers will receive e-mail notification
whenever there are changes, updates, revisions or errata related to a
specified product family or development tool of interest.

To register, access the Microchip web site at www.microchip.com, click
on Customer Change Notification and follow the registration
instructions.

The Development Systems product group categories are:

* Compilers - The latest information on Microchip C compilers and
  other language tools. These include the MPLAB C18 and MPLAB C30 C
  compilers; MPASM(TM) and MPLAB ASM30 assemblers; MPLINK(TM) and
  MPLAB LINK30 object linkers; and MPLIB(TM) and MPLAB LIB30 object
  librarians.

* Emulators - The latest information on Microchip in-circuit
  emulators.  This includes the MPLAB ICE 2000 and MPLAB ICE 4000.

* In-Circuit Debuggers - The latest information on the Microchip
  in-circuit debugger, MPLAB ICD 2.

* MPLAB IDE - The latest information on Microchip MPLAB IDE, the
  Windows(R) Integrated Development Environment for development
  systems tools.  This list is focused on the MPLAB IDE, MPLAB IDE
  Project Manager, MPLAB Editor and MPLAB SIM simulator, as well as
  general editing and debugging features.

* Programmers - The latest information on Microchip programmers. These
  include the MPLAB PM3 and PRO MATE(R) II device programmers and the
  PICSTART(R) Plus and PICkit(TM) 1 development programmers.

Additional Support
------------------

Users of Microchip products can receive assistance through several
channels:

* Distributor or Representative
* Local Sales Office
* Field Application Engineer (FAE)
* Technical Support

Customers should contact their distributor, representative or field
application engineer (FAE) for support. Local sales offices are also
available to help customers. A listing of sales offices and locations
is available on our website.

Technical support is available through the web site at:
http://support.microchip.com

